e9f3b6789bff75d21787d82e44dfe9185bce5d6d,src/main/java/genesis/block/BlockPrototaxites.java,BlockPrototaxites,canPlantStayAt,#BlockGrowingPlant#World#BlockPos#PlantState#,72
Before Change
return CanStayOptions.NO;
}
if (plantState == PlantState.IN_WORLD
&& WorldUtils.canSoilSustainTypes(world, pos, EnumPlantType.Plains)
&& !WorldUtils.canSoilSustainTypes(world, pos, BlockPrototaxitesMycelium.SOIL_TYPE))
return CanStayOptions.NO;
return CanStayOptions.YIELD;
}
After Change
}
@Override
public CanStayOptions canPlantStayAt(BlockGrowingPlant plant, World world, BlockPos pos, PlantState plantState)
{
for (EnumFacing side : EnumFacing.HORIZONTALS)
{
BlockPos sidePos = pos.offset(side);
IBlockState sideState = world.getBlockState(sidePos);
if (sideState.getBlock() == this || sideState.isSideSolid(world, sidePos, side.getOpposite()))
{
return CanStayOptions.NO;
}
}
IBlockState stateDown = world.getBlockState(pos.down());
if (stateDown.getBlock().canSustainPlant(stateDown, world, pos.down(), EnumFacing.UP, this)
&& !world.getBlockState(pos.up()).getMaterial().isLiquid()
&& WorldUtils.canSoilSustainTypes(world, pos, EnumPlantType.Plains))
{
return CanStayOptions.YES;
}
return CanStayOptions.YIELD;